In typical web applications, data are presented to a user by formatting the data as HTML documents using template processing. In template processing, a document, such as a web page, can be generated using structured input data and a template. The structured input data contain the data to be presented in the document and the template specifies the layout of the document and how to bind the input data to the document.
There are a great variety of different template processing systems in use. These different template processing systems can include different types of layout instructions that specify the layout of a document and/or template-processing instructions that specify how to bind input data to the template. Template-processing instructions can be very diverse ranging from simple variable substitution or can be relatively complex and can be as powerful as general purpose programming instructions.
In some cases, it can be desirable to migrate a web application from one type of template processing system to another type of template processing system. For instance, an improved template processing system for a web application can be developed and it can be desirable to migrate a web application from the old template processing system to the new template processing system. In general, this migration from one template processing system to another involves the manual rewrite of the templates from the old template syntax to the new template syntax. It can be difficult to automate rewriting of templates from one template syntax to another because many template processing systems have no notion of syntactic correctness of the output of the template.